<?php


namespace Part24_IntermediaryModel\Code3;


class CommonManger extends Manager
{

    function requestApplications($request)
    {
        if ($request->getType() == '请假' && $request->getNum() <= 2) {
            // 经理能处理2天以下的请假
            echo "{$this->name}：已批准{$request->getContent()}{$request->getNum()}天\n";
        } else {
            if ($this->superior != null) {
                $this->superior->requestApplications($request);
            }
        }
    }
}